package com.action;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.dto.EmpInfo;
import com.service.AdminService;
@RestController
@RequestMapping("AdminAction")
public class AdminAction {
	@Autowired
	private AdminService as;
	@RequestMapping("adminLogin.do")//员工登录
	public Map<String,Object> queryEmp(EmpInfo emp,HttpSession session){
		Map<String,Object> json=new HashMap<String,Object>();
		if(as.queryEmp(emp)!=null) {
			json.put("miss", true);
			session.setAttribute("emp", emp);
		}else{
			json.put("miss", false);
		}
		return json;
	}
}
